package main;

/**
 * Defines a generic grid
 * @see ICoordinate
 * @author romain
 *
 */
public interface IGrid {
	
	/**
	 * Performs one iteration update in the grid
	 *
	 */
	public void stepGrid();
	
	/**
	 * Returns true if we should stop iterating
	 * @return boolean
	 */
	public boolean isDone();
	
	/**
	 * Prints a textual representation of the cell
	 * indicated by coord
	 * @param coord
	 * @return String
	 */
	public String printCell(ICoordinate coord);
	
	/**
	 * Gets the coordinate neighboring the one given in
	 * the direction given. Directions are defined in the ICoordinate
	 * interface as DIR_*.
	 * @see ICoordinate
	 * @param coord
	 * @param direction
	 * @return ICoordinate
	 */
	public ICoordinate getNeighbor(ICoordinate coord, int direction);
	
	/**
	 * Gets the value (as a float) in the cell 
	 * specified by coord
	 * @param coord
	 * @return float
	 */
	public float getFloatValue(ICoordinate coord);
	
	/**
	 * Gets the value (as a double) in the cell
	 * specified by coord
	 * @param coord
	 * @return double
	 */
	public double getDoubleValue(ICoordinate coord);
	
	/**
	 * Sets the value (as a float) of the cell
	 * specified by coord.
	 * @param coord
	 * @param value
	 */
	public void setFloatValue(ICoordinate coord, float value);
	
	/**
	 * Sets the value (as a double) of the cell
	 * specified by coord
	 * @param coord
	 * @param value
	 */
	public void setDoubleValue(ICoordinate coord, double value);
	
	/**
	 * Gets the value (as a Float) in the cell 
	 * specified by coord
	 * @param coord
	 * @return Float
	 */
	public Float getFloatObjValue(ICoordinate coord);
	
	/**
	 * Gets the value (as a Double) in the cell
	 * specified by coord
	 * @param coord
	 * @return Double
	 */
	public Double getDoubleObjValue(ICoordinate coord);
	
	/**
	 * Sets the value (as a Float) of the cell
	 * specified by coord.
	 * @param coord
	 * @param value
	 */
	public void setFloatObjValue(ICoordinate coord, Float value);
	
	/**
	 * Sets the value (as a Double) of the cell
	 * specified by coord
	 * @param coord
	 * @param value
	 */
	public void setDoubleObjValue(ICoordinate coord, Double value);
	
}